#include <algorithm/analytical_model/CommonPara.h>
#include <algorithm/analytical_model/HeliostatPara.h>
#include <algorithm/analytical_model/HeliostatWithGlassPara.h>
#include <algorithm/analytical_model/ScenePara.h>
#include <algorithm/analytical_model/Simplified/NEGPara.h>
#include <algorithm/analytical_model/algorithm/ModelPara.h>
#include <algorithm/analytical_model/algorithm/dnn/backend/openvino/CompiledModelCache.h>
#include <algorithm/analytical_model/algorithm/dnn/params/NEG.h>
#include <algorithm/analytical_model/algorithm/geometry/AllGeometry.h>
#include <algorithm/analytical_model/algorithm/geometry/Utils.h>
#include <algorithm/analytical_model/simplified/NEGPara.h>
#include <algorithm/shared/data/scene/Heliostat.h>
#include <algorithm/shared/data/scene/Receiver.h>
#include <algorithm/shared/data/scene/Sun.h>
#include <algorithm/shared/data/topology/geometry/Rectangle3D.h>
#include <algorithm/shared/data/world/sun/sun_position/SunPosition.h>
#include <utils/ParaUtils.h>
#include <utils/config.h>

#include <openvino/openvino.hpp>

#include <bit>
#include <memory>
#include <vector>

// 仅支持矩形平面定日镜

using namespace solar;

template <>
void solar::computeSigma(SimulationPara* simulation_para, ScenePara* scene_para,
                         SOLAR_ARRAY_ARG HeliostatPara* heliostat_para, CommonPara* common_para,
                         Sun* sun, SOLAR_ARRAY_ARG Heliostat* heliostat, Receiver* receiver,
                         std::size_t num_helios, SOLAR_ARRAY_ARG NEGPara* ptr,
                         ComputeSigmaCallback callback)
{
    std::vector<dnn::NEGInput> net_inputs(num_helios);
    const auto model_path = SOLAR_GET_VALUE(CommonPara, path_to_model_, *common_para);
    auto compiled_model_cache = dnn::openvino::CompiledModelCache::get_mutable_instance();
    dnn::openvino::DeviceType preferred_device_type =
        num_helios < 100 ? dnn::openvino::DeviceType::CPU : dnn::openvino::DeviceType::GPU;
    ov::CompiledModel& compiled_model =
        compiled_model_cache.getCompiledModel(model_path, preferred_device_type);
    constexpr ov::element::Type input_type = ov::element::f32;
    constexpr auto input_params_count = sizeof(dnn::NEGInput) / sizeof(float);

    // model specific part
}
